<?php

namespace app\index\validate;

use think\Validate;

class IndexValidator extends Validate
{
    protected $rule = ['content' => 'require|max:200','answer'=>'require|max:50'];
    protected $message = ['content.require'=>'内容不能为空',
        'content.max'=>"字数不能超过200字",
        'answer.require'=>'回复不能为空',
        'answer.max'=>'字数不能超过50字'];
    protected $scene = ['need'=>'content','aa'=>'answer'];
}